# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gnome-podcasts
pkgver=0.5.1
pkgrel=2
pkgdesc='Podcast application for GNOME'
arch=('loong64' 'x86_64')
url='https://wiki.gnome.org/Apps/Podcasts'
license=('GPL3')
depends=('gst-plugins-bad' 'gst-plugins-base' 'gst-plugins-good' 'libhandy')
makedepends=('meson' 'rust')
optdepends=('gst-plugins-ugly: Extra media codecs'
            'gst-libav: Extra media codecs')
source=("https://gitlab.gnome.org/World/podcasts/-/archive/$pkgver/podcasts-$pkgver.tar.gz"
         https://gitlab.gnome.org/World/podcasts/-/commit/6614bb62.patch)
sha256sums=('73c2d6422e4084e389f07d6daee2339512f68d5b7e38cfc7db35466b16c13500'
            '1c9cafb55a03aaada44db5bc62d986d7551212c91bfdff75d6b76af88ba88c9e')

prepare() {
  patch -d podcasts-$pkgver -p1 < 6614bb62.patch # Fix build with meson 0.61
}

build() {
  arch-meson podcasts-$pkgver build
  meson compile -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
